package CarLease.entity;

public class Van extends Car {
    //子类属性载重属性
    private final double Load;

    public Van(String carId, String model, String color, double price, double displacement, double load) {
        super(carId, model, color, price, displacement);
        this.Load = load;
    }

    //Van重写父类方法，计算租赁费用
    @Override
    public double calculateRent(int day) {
        return day * (1500 + Load * 100);
    }

    //Van重写父类方法，显示信息

    @Override
    public void showSpecialInfo() {
        System.out.println("载重属性"+Load);
    }
}
